package com.myteam.mystory.fragment;

import java.util.List;

import com.myteam.mystory.R;
import com.myteam.mystory.adapter.HistoryAdapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.ListView;

@SuppressLint("ValidFragment")
public class HistoryFragment extends Fragment {

	private Context context;
	private String[] history_namestory;
	private GridView history_gridview;

	public HistoryFragment(Context context) {
		super();
		this.context = context;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		View rootView = inflater.inflate(R.layout.history, container, false);
		history_gridview = (GridView) rootView.findViewById(R.id.history_gridview);
		history_namestory = new String[]{"adfasgf","agđgadf","agfdsagag","agfhagfd","agfag","agfah","agfahg","agah","aghadhf","agfah"};
		HistoryAdapter adapter = new HistoryAdapter(context, R.id.history_nameStory, history_namestory);
		history_gridview.setAdapter(adapter);
		return rootView;
	}
}
